<template>
  <div>
    <van-cell-group>
      <!-- 头部 -->
      <van-cell title="搜索历史">
        <div>
          <span @click="removeHistory">全部删除</span>
        </div>
      </van-cell>
      <!-- 内容 -->
      <van-cell :title="item" v-for="(item,index) in historys" :key="index">
        <van-icon name="delete"></van-icon>
      </van-cell>
    </van-cell-group>
  </div>
</template>

<script>
export default {
  name: 'historys',
  data () {
    return {
    }
  },
  props: {
    historys: {
      type: Array,
      required: true
    }
  },
  created () {

  },

  methods: {
    removeHistory () {
      this.$emit('removeAllHistory')
    }
  }
}
</script>

<style scoped lang='less'>

</style>
